// yada yada

#include <iostream>
#include <vector>

#include "product.hpp"
#include "food.hpp"
#include "beverage.hpp"
#include "mall.hpp"
#include "department.hpp"
#include "employee.hpp"

int main()
{
    std::cout << "Hello World!" << std::endl;

    // use gods hand to create generic people
    std::vector <Employee> fooders;
    
    fooders.push_back(Employee("Hans", "Bolup"));
    fooders.push_back(Employee("Roland", "Der D"));
    fooders.push_back(Employee("Mark", "No Lastname"));

    std::vector<Employee> beveragers;

    beveragers.push_back(Employee("Monika", "Monk"));
    beveragers.push_back(Employee("Monique", "Monc"));
    beveragers.push_back(Employee("Markus", "Moncc"));

    // use gods hand to make food that has
    // a destructive effect on society
    std::vector<Product> foods;

    for (size_t i = 0; i < 30; i++)
    {
        if (i < 10)
            foods.push_back(Food("Donut", 2, "AMA Guetesiegel"));
        else if (i < 20)
            foods.push_back(Food("Android 8", 1.5, "Oreo certified"));
        else
            foods.push_back(Food("Bananas", 1, "AMA Bananensiegel"));
        std::cout << foods.back().get_description() << " #" << i << " created" << "\n";
    }
    
    // use gods hand to make beverages that have
    // a destructive effect on society
    std::vector<Product> beverages;
    
    for (size_t i = 0; i < 30; i++)
    {
        if (i < 10)
            beverages.push_back(Food("Water", 0.4, "just plain water"));
        else if (i < 20)
            beverages.push_back(Food("Diabetes", 0.1, "none"));
        else
            beverages.push_back(Beverage("Dr Pepper (the drink of intellectuals)", 1.5, "unhealthy, carbonated water"));
        std::cout << beverages.back().get_description() << " #" << i << " created" <<"\n";
    }
    
    // use gods hand to create departments
    std::vector<Department> departments;
    departments.push_back(Department("Foodstuffs", foods, fooders));
    departments.push_back(Department("Beverages", beverages, beveragers));

    // use gods hand to create malls
    auto scs = Mall("SCS", departments);

    for (Department department : departments)
        department.sell();

    for (Employee employee : fooders)
        std::cout << "employee " << employee.get_name() << " has " << employee.get_revenue() << " riches\n";

    for (Employee employee : beveragers)
        std::cout << "employee " << employee.get_name() << " has " << employee.get_revenue() << " riches\n";

    std::cout << "the " << scs.get_description() << " now has " << scs.get_revenue() << " riches\n";
    
    // all good
    return 0;
}